package com.emcom.gotour.mvc.view;

import java.io.Serializable;
import java.util.List;

import com.emcom.gotour.po.TourContent;
import org.apache.commons.lang.builder.CompareToBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

public class TourCategoryView implements Comparable<Object>, Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 6281477656299316193L;
	private String title;
	private String category;
	private List<TourContent> tourContentList;
	private List<TourContent> popularList;
	private TourContent ad;
	private MenuView menuView;
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getCategory() {
		return category;
	}
	public void setCategory(String category) {
		this.category = category;
	}
	public List<TourContent> getTourContentList() {
		return tourContentList;
	}
	public void setTourContentList(List<TourContent> tourContentList) {
		this.tourContentList = tourContentList;
	}
	public List<TourContent> getPopularList() {
		return popularList;
	}
	public void setPopularList(List<TourContent> popularList) {
		this.popularList = popularList;
	}
	public TourContent getAd() {
		return ad;
	}
	public void setAd(TourContent ad) {
		this.ad = ad;
	}
	public MenuView getMenuView() {
		return menuView;
	}
	public void setMenuView(MenuView menuView) {
		this.menuView = menuView;
	}
	/**
	 * @see java.lang.Comparable#compareTo(Object)
	 */
	public int compareTo(Object object) {
		TourCategoryView myClass = (TourCategoryView) object;
		return new CompareToBuilder().append(this.category, myClass.category)
				.append(this.title, myClass.title).append(this.ad, myClass.ad)
				.append(this.menuView, myClass.menuView).append(
						this.popularList, myClass.popularList).append(
						this.tourContentList, myClass.tourContentList)
				.toComparison();
	}
	/**
	 * @see java.lang.Object#equals(Object)
	 */
	public boolean equals(Object object) {
		if (!(object instanceof TourCategoryView)) {
			return false;
		}
		TourCategoryView rhs = (TourCategoryView) object;
		return new EqualsBuilder().appendSuper(super.equals(object)).append(
				this.category, rhs.category).append(this.title, rhs.title)
				.append(this.ad, rhs.ad).append(this.menuView, rhs.menuView)
				.append(this.popularList, rhs.popularList).append(
						this.tourContentList, rhs.tourContentList).isEquals();
	}
	/**
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		return new HashCodeBuilder(-6850393, 56681131).appendSuper(
				super.hashCode()).append(this.category).append(this.title)
				.append(this.ad).append(this.menuView).append(this.popularList)
				.append(this.tourContentList).toHashCode();
	}
	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return new ToStringBuilder(this).append("tourContentList",
				this.tourContentList).append("category", this.category).append(
				"ad", this.ad).append("popularList", this.popularList).append(
				"menuView", this.menuView).append("title", this.title)
				.toString();
	}
}
